class Calculator
	{
	//Method to display an array 
	public static void displayIntArray(int[] a)
		{
		for(int i=0; i<a.length; i++)
			System.out.print(a[i] + " ");
		}
		
	//Method to generate an array having random numbers
	public static int[] generateRandomInt(int s)
		{
		int[] a = new int[s];
		for(int i = 0;i < a.length; i++)
			a[i] =(int) (Math.random()*100);
		return a;
		}
		
	//Method to sort anarray using Bubble Sort
	public static int[] bubbleSort(int[] a)
		{
		for(int i=0;i<a.length-1;i++)
			{
			for(int j=a.length-1; j>i; j--)
				{
				if(a[j]<a[j-1])
					{
					int temp=a[j];
					a[j]=a[j-1];
					a[j-1]=temp;
					}
				}
			}
		return a;
		}
		
	//Method to sort an array using insertion sort.
	public static int[] insertionSort(int[] a)
		{
		int i,j,k;
		for(i=0;i<a.length;i++)
			{
			for(j=i-1; j>=0 ;j--)
				{
				if(a[j]>a[i])
					{
					for(k=i; k>=1 && a[i]<a[k-1]; k--)
						{
						a[k]=a[k-1];
						}
					a[k]=a[i];
					}
				}	
			}
		return  a;
		}
	}
		
	

	//Method to sort an array using Quick Sort
	